﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data;
using System.Data.SqlClient;
namespace DAO
{
    public class DAO_ACCOUNT
    {
        DataProvider dp = new DataProvider();
        public DataTable DangNhap(DTO_Account ac)
        {
            DataTable tb = new DataTable();
            try
            {
                if (dp.MoketNoi())
                {
                    SqlParameter[] par = new SqlParameter[2];
                    par[0] = new SqlParameter("@matkhau", ac.Password);
                    par[1] = new SqlParameter("@email", ac.Email);
                    tb = dp.ExecuteQuery("dangnhap", par);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return tb;
        }
    }
}
